﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="AccountPrivateForm.aspx.cs" Inherits="App_Input_AccountPrivateForm"
    Title="个人收费" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
function changeDrp()
{
    //alert("");
    
    window.document.getElementById('<%=txtMemberNo.ClientID %>').disabled=false;
    window.document.getElementById('<%=txtCardNo.ClientID %>').disabled=true;
}
function changeTxt()
{
    //alert("");
    
    window.document.getElementById('<%=txtMemberNo.ClientID %>').disabled=true;
    window.document.getElementById('<%=txtCardNo.ClientID %>').disabled=false;
}

function popPrint()
{
    var memberNo=window.document.getElementById('<%=hidMemberNo.ClientID%>').value;
    var beginDate=window.document.getElementById('<%=hidBeginDate.ClientID%>').value;
    var endDate=window.document.getElementById('<%=hidEndDate.ClientID%>').value;
    var commitFlg=window.document.getElementById('<%=hidCommitFlg.ClientID%>').value;
    window.open('./AccountPrivatePrintForm.aspx?MEMBERNO='+memberNo+"&BEGINDATE="+beginDate+"&ENDDATE="+endDate+"&COMMITFLG="+commitFlg,'','toolbars=0,resizable=1');
}
    </script>

    <table class="table_border_line">
        <tr>
            <th colspan="3" align="left" style="text-align: left;">

                <script language="javascript">
                    (new TitleBar('SearchBar', '检索条件')).showBar();
                </script>

            </th>
        </tr>
        <tr>
            <td style="height: 25px;">
            </td>
        </tr>
        <tr>
            <td style="width: 47px; text-align: right;">
                <asp:RadioButton ID="Rbtn1" runat="server" Checked="True" GroupName="type" onclick="changeDrp()" /></td>
            <td style="width: 63px">
                会员编号</td>
            <td>
                <asp:TextBox ID="txtMemberNo" runat="server" MaxLength="11" Width="85px"></asp:TextBox><asp:TextBox
                    ID="txtMemberName" runat="server" BackColor="#E0E0E0" BorderColor="#E0E0E0" contentEditable="false"
                    ForeColor="Black" Width="89px"></asp:TextBox><a href="#" onclick="javascript:popupMemberSearch('<%=txtMemberNo.ClientID%>', '<%=txtMemberName.ClientID %>' );">
                        <img id="searchImg" runat="server" src="../../images/search.jpg" border="0" />
                    </a><span style="color: #ff7300"></span>
            </td>
        </tr>
        <tr>
            <td style="width: 47px; text-align: right;">
                <asp:RadioButton ID="Rbtn2" runat="server" GroupName="type" onclick="changeTxt()" /></td>
            <td style="width: 63px">
                卡号</td>
            <td>
                <asp:TextBox ID="txtCardNo" runat="server" Enabled="False" Width="173px"></asp:TextBox><span
                    style="color: #ff7300">（会员编号与卡号必须任选一个填写）</span></td>
        </tr>
        <tr>
            <td style="width: 47px">
            </td>
            <td style="width: 63px">
                付款标志</td>
            <td>
                <asp:DropDownList ID="drpCommitFlg" runat="server">
                    <asp:ListItem Value=" ">全部</asp:ListItem>
                    <asp:ListItem Value="0">未付</asp:ListItem>
                    <asp:ListItem Value="1">已付</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td style="width: 47px; height: 15px; text-align: right;">
                <span style="color: #ff7300">*</span></td>
            <td style="width: 63px; height: 15px;">
                账单日期</td>
            <td style="height: 15px">
                <asp:TextBox ID="txtBeginDate" runat="server" onfocus="new Calendar().show(this);"
                    Width="105px"></asp:TextBox>～
                <asp:TextBox ID="txtEndDate" runat="server" onfocus="new Calendar().show(this);"
                    Width="105px"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="height: 25px">
            </td>
            <td style="height: 25px">
            </td>
            <td style="height: 25px">
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
            </td>
            <td>
                <asp:Button ID="btnSeach" runat="server" CssClass="button" OnClick="btnSeach_Click"
                    Text="检 索" Width="60px" /></td>
        </tr>
    </table>
    <br />
    <table class="table_border_line" id="tbl1" runat="server">
        <tr>
            <th colspan="5" align="left" style="text-align: left;">

                <script language="javascript">
                    (new TitleBar('SearchBar', '账单明细')).showBar();
                </script>

            </th>
        </tr>
        <tr>
            <td style="height: 25px">
            </td>
        </tr>
        <tr>
            <td style="width: 47px; height: 25px;">
            </td>
            <td style="width: 63px; height: 25px">
                房间号</td>
            <td style="width: 157px; height: 25px">
                <asp:Label ID="lblApartmentNo" runat="server"></asp:Label></td>
            <td style="width: 63px; height: 25px">
                会员卡号</td>
            <td style="height: 25px">
                <asp:Label ID="Label2" runat="server"></asp:Label></td>
        </tr>
        <tr>
            <td style="width: 47px; height: 25px">
            </td>
            <td style="width: 63px; height: 25px">
                会员编号</td>
            <td style="width: 157px; height: 25px">
                <asp:Label ID="lblMemberNo" runat="server"></asp:Label></td>
            <td style="width: 63px; height: 25px">
                会员姓名</td>
            <td style="height: 25px">
                <asp:Label ID="lblNameC" runat="server"></asp:Label></td>
        </tr>
        <tr>
            <td style="width: 47px; height: 25px">
            </td>
            <td style="width: 63px; height: 25px">
                账单总额</td>
            <td style="width: 157px; height: 25px">
                <asp:Label ID="lblSumAmount" runat="server"></asp:Label></td>
            <td style="width: 63px; height: 25px">
            </td>
            <td style="height: 25px">
            </td>
        </tr>
    </table>
    <table class="table_border_line" id="tbl2" runat="server">
        <tr>
            <td style="height: 25px;" colspan="2">
                <asp:GridView ID="viewSrhRst" runat="server" AutoGenerateColumns="False" BorderStyle="Solid"
                    BorderWidth="3px" CssClass="GridView_table" OnRowDataBound="viewSrhRst_RowDataBound" AllowPaging="True" OnPageIndexChanging="viewSrhRst_PageIndexChanging" PageSize="20">
                    <PagerSettings Mode="NumericFirstLast" />
                    <Columns>
                        <asp:BoundField DataField="InvoiceDate" HeaderText="账单日期" >
                            <ItemStyle CssClass="GridView_item_center" Width="15%"/>
                            <HeaderStyle CssClass="GridView_head_grayblue" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="消费类型" DataField="InvoiceType">
                            <ItemStyle CssClass="GridView_item_left" Width="15%"/>
                            <HeaderStyle CssClass="GridView_head_grayblue" />
                        </asp:BoundField>
                        <asp:BoundField DataField="EmployeeName" HeaderText="生活管家">
                            <ItemStyle CssClass="GridView_item_center" Width="10%"/>
                            <HeaderStyle CssClass="GridView_head_grayblue" />
                        </asp:BoundField>
                        <asp:BoundField DataField="InvoiceContent" HeaderText="消费内容">
                            <ItemStyle CssClass="GridView_item_left" Width="40%"/>
                            <HeaderStyle CssClass="GridView_head_grayblue" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Amount" HeaderText="金额">
                            <ItemStyle CssClass="GridView_item_right" Width="10%"/>
                            <HeaderStyle CssClass="GridView_head_grayblue" />
                        </asp:BoundField>
                        <asp:BoundField DataField="InvoiceFlg" HeaderText="状态">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" />
                        </asp:BoundField>
                        
                    </Columns>
                    <PagerStyle HorizontalAlign="Right" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
        <td style="height:20px;"></td>
        </tr>
        <tr>
            <td style="text-align: center;">
                <input id="btnPrint" runat="server" class="button" onclick="popPrint()" style="width: 77px"
                    type="button" value="  打 印  " /></td>
        </tr>
    </table>
    <cc1:ComValidator ID="ComValidator1" runat="server" Visible="False" CheckItems-Capacity="4">
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtMemberNo">
            <cc1:ComAbsParamsAttribute Parameter="会员编号" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtBeginDate">
            <cc1:ComAbsParamsAttribute Parameter="开始日期" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtEndDate">
            <cc1:ComAbsParamsAttribute Parameter="结束日期" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtBeginDate">
            <cc1:ComAbsParamsAttribute Parameter="开始日期" />
        </cc1:CheckDateAttribute>
        <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtEndDate" DataFormat="yyyy/mm/dd">
            <cc1:ComAbsParamsAttribute Parameter="结束日期" />
        </cc1:CheckDateAttribute>
        <cc1:CheckDateRangeAttribute Code="E0331" ControlToValidator1="txtBeginDate" ControlToValidator2="txtEndDate">
            <cc1:ComAbsParamsAttribute Parameter="开始日期" />
            <cc1:ComAbsParamsAttribute Parameter="结束日期" />
        </cc1:CheckDateRangeAttribute>
    </cc1:ComValidator>
    <cc1:ComValidator ID="Comvalidator2" runat="server" Visible="False" CheckItems-Capacity="4">
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtCardNo">
            <cc1:ComAbsParamsAttribute Parameter="卡号" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtBeginDate">
            <cc1:ComAbsParamsAttribute Parameter="开始日期" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckRequiredAttribute Code="E0082" ControlToValidator="txtEndDate">
            <cc1:ComAbsParamsAttribute Parameter="结束日期" />
        </cc1:CheckRequiredAttribute>
        <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtBeginDate">
            <cc1:ComAbsParamsAttribute Parameter="开始日期" />
        </cc1:CheckDateAttribute>
        <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtEndDate" DataFormat="yyyy/mm/dd">
            <cc1:ComAbsParamsAttribute Parameter="结束日期" />
        </cc1:CheckDateAttribute>
        <cc1:CheckDateRangeAttribute Code="E0331" ControlToValidator1="txtBeginDate" ControlToValidator2="txtEndDate">
            <cc1:ComAbsParamsAttribute Parameter="开始日期" />
            <cc1:ComAbsParamsAttribute Parameter="结束日期" />
        </cc1:CheckDateRangeAttribute>
    </cc1:ComValidator>
    <asp:HiddenField ID="hidMemberNo" runat="server" />
    <asp:HiddenField ID="hidBeginDate" runat="server" />
    <asp:HiddenField ID="hidEndDate" runat="server" />
    <asp:HiddenField ID="hidCommitFlg" runat="server" />
</asp:Content>
